package top.auntie.util;

import org.apache.commons.lang3.time.DateFormatUtils;
import top.auntie.common.Constants;

import java.util.Date;

public class DateTimeUtils {

    public static String getNowDateStr() {
        return getDateStr(new Date());
    }

    public static String getDateStr(Date date) {
        return DateFormatUtils.format(date, Constants.DATE_PATTERN);
    }

    public static String getNowDateTimeStr() {
        return DateFormatUtils.format(new Date(), Constants.TIME_PATTERN);
    }

}
